<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no" />
    <title>transition配合animate.css</title>
    <link rel="stylesheet" href="css/animate.css">
    <style>
        [v-cloak] {
            display: none;
        }

        .box {
            width: 100px;
            height: 100px;
            background: #0000FF;
            position: absolute;
            z-index: 1;
            left: 100px;
            top: 35px;
        }
    </style>
</head>

<body>
    <div id="app" v-cloak></div>
    <script src="js/vue.js"></script>
    <script>
        let App = {
            template: `
        <div>
        <button type="button" @click="isShow=!isShow">动画效果</button>
        <transition name="fade" enter-active-class="animated bounceIn" leave-active-class="animated bounceInUp">
               <div class="box" v-show="isShow"></div>
        </transition>
</div>
      `,
            data() {
                return {
                    isShow: false
                }
            }
        };
        new Vue({
            el: "#app",
            template: `
           <App/>
        `,
            components: {
                App
            }
        })
    </script>
</body>

</html>